	<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="../css/reset.css">
	<link rel="stylesheet" type="text/css" href="../css/common-list.css">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<style>
		
	</style>
</head>
<body>
	<header>
		<div class="header-con">
			<a class="navbar-header" href="">
				<img src="../images/logo.png" alt="">
			</a>
			<ul>
				<li>
					<a href="">首页</a>
				</li>
				<li>
					<a href="">人资管理</a>
				</li>
				<li>
					<a href="">指标设置</a>
				</li>
				<li>
					<a href="">数据统计</a>
				</li>
				<li>
					<a href="">工作时设置</a>
				</li>
				<li>
					<a href="">财务管理</a>
				</li>
			</ul>
		</div>
		<div class="peo-message">
			<div class="peo-cir">
				<!-- <img src="" alt=""> -->
			</div>
			<em>黑披士</em>
			<span class="down-list"></span>
			<!-- <ul>
				<li>123</li>
			</ul> -->
		</div>
	</header>
	<div class="boxed clearfix">
		<div class="mask cos-add">
			<div class="mask-box">
				<div class="mask-head">
					<h4>添加</h4>
					<span></span>
				</div>
				<div class="mask-con">
					<div class="mask-marc">
						<ul>
							<li>
								<span>成本名称:</span>
								<input type="text">
							</li>
							<li class="fina-cost">
								<span>成本分店:</span>
								<div class="multiselect-box">
									<div class="mul-downbtn">
										<em></em>
										<input type="text" placeholder="搜索">
									</div>
									<div class="multiselect-down">
										<ul>
											<li>
												<span></span>
												<strong>测试1</strong>
											</li>
											<li>
												<span></span>
												<strong>测试2</strong>
											</li>
											<li>
												<span></span>
												<strong>测试3</strong>
											</li>
											<li>
												<span></span>
												<strong>测试4</strong>
											</li>
											<li>
												<span></span>
												<strong>测试5</strong>
											</li>
											<li>
												<span></span>
												<strong>测试6</strong>
											</li>
											<li>
												<span></span>
												<strong>测试7</strong>
											</li>
											<li>
												<span></span>
												<strong>测试8</strong>
											</li>
											<li>
												<span></span>
												<strong>测试10</strong>
											</li>
										</ul>
										<div class="mul-btn clearfix">
											<div class="mul-confirm">确认</div>
											<div class="mul-cancel">取消</div>
										</div>
									</div>
								</div>
							</li>
							<li>
								<span>成本费用:</span>
								<input type="text"> 
								<em>元</em>
							</li>
							<li>
								<span>成本周期:</span>
								<input type="text">
								<em>月</em>
							</li>
						</ul>
					</div>
				</div>
				<div class="mask-confirm">确认</div>
			</div>
		</div>
		<div class="common-tit">
			<h2>固定成本设置</h2>
			<span>财务管理 > 固定成本设置</span>
			<a id="addCost" class="add-staff" href="javascript:;">添加</a>
		</div>
		<div class="chief">
			<h3>团队指标</h3>
		</div>
		<div class="indi-con tut">
			<div class="scrollbox">
				<table>
					<thead>
						<tr>
							<th class="fina-name">名称</th>
							<th class="fina-clnum">费用(元)</th>
							<th class="fina-money">周期</th>
							<th class="fina-money">分担分店</th>
							<th class="mar-operation">
								<div>
									<em>操作</em>
								</div>
							</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td>张幻想</td>
							<td>3,000</td>
							<td>12月</td>
							<td>分店一,分店二</td>
							<td class="mar-operation">
								<div>
									<em>[</em>
									<span class="f-edit">编辑</span>
									<em>]</em>
								</div>
							</td>
						</tr>
						<tr>
							<td>张幻想</td>
							<td>3,000</td>
							<td>12月</td>
							<td>分店一,分店二</td>
							<td class="mar-operation">
								<div>
									<em>[</em>
									<span class="f-edit">编辑</span>
									<em>]</em>
								</div>
							</td>
						</tr>
						<tr>
							<td>张幻想</td>
							<td>3,000</td>
							<td>12月</td>
							<td>分店一,分店二</td>
							<td class="mar-operation">
								<div>
									<em>[</em>
									<span class="f-edit">编辑</span>
									<em>]</em>
								</div>
							</td>
						</tr>
						<tr>
							<td>张幻想</td>
							<td>3,000</td>
							<td>12月</td>
							<td>分店一,分店二</td>
							<td class="mar-operation">
								<div>
									<em>[</em>
									<span class="f-edit">编辑</span>
									<em>]</em>
								</div>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	<script src="../js/jquery-1.12.3.js"></script>
	<script src="../js/common-list.js"></script>
	<script>
		$("#addCost").on("click", function() {
			$(".cos-add").css({
				"display" : "block"
			});
		});
		
		$(".f-edit").on("click", function() {
			$(".cos-add").css({
				"display" : "block"
			});
		});
		/* 多选下拉列表 */
		$(".mul-downbtn").on("click", function() {
			if (!$(this).next().hasClass("menuopen")) {
				$(this).next().addClass("menuopen");
			}
		});
		$(".multiselect-down li").on("click", function() {
			if ($(this).hasClass("mul-select")) {
				$(this).removeClass("mul-select");
			} else {
				$(this).addClass("mul-select");
			};
		});
		$(".mul-confirm").on("click", function() {
			var arr = [];
			for (var i = 0; i < $(this).parent().parent().find(".mul-select").length; i++) {
				arr.push($($(this).parent().parent().find(".mul-select")[i]).children("strong").text());
			};
			console.log(arr);
			// 在此处加入ajax 提交数据
			$(this).parent().parent().removeClass("menuopen");
		})
		$(".mul-cancel").on("click", function() {
			$(this).parent().parent().removeClass("menuopen");
		})
		$(".mul-downbtn input").on('input',function(e){
			if ($(this).val() != "") {
		  		// console.log($(this).val());
		  		$(".multiselect-down li").addClass("mul-hide");
		  		$($(".multiselect-down li:contains(" + $(this).val() + ")")).removeClass("mul-hide");
			} else {
				$(".multiselect-down li").removeClass("mul-hide");
			}
		});  
	</script>
</body>
</html>